import axios, { AxiosInstance } from 'axios';
import qs from 'qs';


// 配置新建一个 axios 实例
const service: AxiosInstance = axios.create({
	baseURL: 'http://localhost:8889',
	// baseURL: 'http://192.168.31.41:8889',
	timeout: 50000,
	headers: { 'Content-Type': 'application/json' },
	paramsSerializer: {
		serialize(params) {
			return qs.stringify(params, { allowDots: true });
		},
	},
});


// 导出 axios 实例
export { service };

